import React, {Component} from 'react';
import {Route, Switch, Redirect} from 'react-router-dom'

import Login from '../containers/login/login'
import Register from '../containers/register/register'
import AuthRoute from '../components/authRoute/authRoute'

function Boss() {
  return <h2>boss页面</h2>
}

class App extends Component {
  render() {
    return (
      <div className="App">
        <Switch>
          <AuthRoute/>
          <Redirect path="/" to={{pathname: '/login'}} exact/>
          <Route path='/login' component={Login} exact/>
          <Route path='/boss' component={Boss}/>
          <Route path='/register' component={Register}/>
        </Switch>
      </div>
    );
  }
}

export default App;
